package pkg

import (
	"encoding/json"
	"fmt"
	"github.com/Baidu-AIP/golang-sdk/aip/censor"
)

func BaiDu(upload string) bool {
	client := censor.NewClient("o835WXQSFVy7KOmsAFSaLUIC", "oldv7Ka8xgEFFJnf7ZiE7FXA7ojbWyPv")

	//视频url路径
	res := client.VideoCensor("视频名字", upload, "extId", nil)
	fmt.Println(res)
	resData := map[string]interface{}{}
	json.Unmarshal([]byte(res), &resData)
	if resData["conclusion"] == "合规" {
		return true
	}
	return false
}
